#include <iostream>
#include <bitset>

int main()
{
	std::string bit{"00001110"};
	int st = std::bitset<8>(bit).to_ulong();

	for (int i = st; i; i = st & (i - 1))
		std::cout << std::bitset<8>(i) << '\n';
}

